package com.seanchenxi.gwt.wordpress.json.service;

import java.util.ArrayList;
import java.util.Date;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.seanchenxi.gwt.wordpress.json.service.model.Author;
import com.seanchenxi.gwt.wordpress.json.service.model.Category;
import com.seanchenxi.gwt.wordpress.json.service.model.DateIndex;
import com.seanchenxi.gwt.wordpress.json.service.model.Page;
import com.seanchenxi.gwt.wordpress.json.service.model.Post;
import com.seanchenxi.gwt.wordpress.json.service.model.PostType;
import com.seanchenxi.gwt.wordpress.json.service.model.Tag;


public interface WordPressJsonServiceAsync {
	
	void getPost(int postId, AsyncCallback<Post> callback);
	
	void getPost(String postSlug, AsyncCallback<Post> callback);
	
	void getPage(int postId, AsyncCallback<Page> callback);
	
	void getPage(String pageSlug, AsyncCallback<Page> callback);

	void getRecentPosts(AsyncCallback<ArrayList<Post>> callback);

	void getRecentPosts(int offset, int size, PostType type, AsyncCallback<ArrayList<Post>> callback);

	void getDatePosts(Date date, AsyncCallback<ArrayList<Post>> callback);
	
	void getDatePosts(Date date, PostType type, int offset, int size, AsyncCallback<ArrayList<Post>> callback);

	void getCategoryPosts(int categoryId, AsyncCallback<ArrayList<Post>> callback);

	void getCategoryPosts(String categorySlug, AsyncCallback<ArrayList<Post>> callback);
	
	void getCategoryPosts(int categoryId, PostType type, int offset, int size, AsyncCallback<ArrayList<Post>> callback);

	void getCategoryPosts(String categorySlug, PostType type, int offset, int size, AsyncCallback<ArrayList<Post>> callback);

	void getTagPosts(int tagId, AsyncCallback<ArrayList<Post>> callback);

	void getTagPosts(String tagSlug, AsyncCallback<ArrayList<Post>> callback);
	
	void getTagPosts(int tagId, PostType type, int offset, int size, AsyncCallback<ArrayList<Post>> callback);

	void getTagPosts(String tagSlug, PostType type, int offset, int size, AsyncCallback<ArrayList<Post>> callback);
	
	void getAuthorPosts(int authorId, AsyncCallback<ArrayList<Post>> callback);
	
	void getAuthorPosts(String authorSlug, AsyncCallback<ArrayList<Post>> callback);

	void getAuthorPosts(int authorId, PostType type, int offset, int size, AsyncCallback<ArrayList<Post>> callback);

	void getAuthorPosts(String authorSlug, PostType type, int offset, int size, AsyncCallback<ArrayList<Post>> callback);

	void searchPosts(String value, AsyncCallback<ArrayList<Post>> callback);
	
	void searchPosts(String value, PostType type, int offset, int size, AsyncCallback<ArrayList<Post>> callback);
	
	void getDateIndex(AsyncCallback<ArrayList<DateIndex>> callback);
	
	void getCategoryIndex(AsyncCallback<ArrayList<Category>> callback);
	
	void getTagIndex(AsyncCallback<ArrayList<Tag>> callback);
	
	void getAuthorIndex(AsyncCallback<ArrayList<Author>> callback);
	
	void getPageIndex(AsyncCallback<ArrayList<Page>> callback);
}
